package code.theMaze;

import listeners.BlackAndWithe;
import utilities.Workbench;
import android.app.Activity;
import android.graphics.Color;
import android.widget.Button;

public class TheMazeButton extends Button {

	private Activity activity;
	private Workbench workbench;
	private int x, y;
	private int color;

	public TheMazeButton(Activity context, Workbench wb, int xval, int yval) {
		super(context);
		this.activity = context;
		this.workbench = wb;

		this.setWidth(32);
		this.setHeight(32);
		this.setBackgroundColor(Color.BLACK);

		this.x = xval;
		this.y = yval;
		this.color = Color.BLACK;
		
		this.workbench.getMemory()[x][y] = Color.BLACK;

		this.setOnClickListener(new BlackAndWithe(this, workbench));

	}

	public int getColor() {
		return color;
	}

	public void setColor(int color) {
		this.color = color;
		this.setBackgroundColor(color);
	}

	public int getX() {
		return x;
	}

	public int getY() {
		return y;
	}

}
